home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / xmalloc.h.z / xmalloc.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.7 KB  |  47 lines

  1. /* $Id: xmalloc.h,v 1.9 1999/02/23 11:43:27 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_XMALLOC_H__
  25. #define __GLIBTOP_XMALLOC_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/error.h>
  29.  
  30. BEGIN_LIBGTOP_DECLS
  31.  
  32. #define glibtop_malloc(p1)    glibtop_malloc_r(glibtop_global_server, p1)
  33. #define glibtop_calloc(p1, p2)    glibtop_calloc_r(glibtop_global_server, p1, p2)
  34. #define glibtop_realloc(p1, p2)    glibtop_realloc_r(glibtop_global_server, p1, p2)
  35. #define glibtop_strdup(p1)    glibtop_strdup_r(glibtop_global_server, p1)
  36. #define glibtop_free(p1)    glibtop_free_r(glibtop_global_server, p1)
  37.  
  38. void *glibtop_malloc_r    (glibtop *server, size_t size);
  39. void *glibtop_calloc_r    (glibtop *server, size_t nmemb, size_t size);
  40. void *glibtop_realloc_r    (glibtop *server, void *ptr, size_t size);
  41. char *glibtop_strdup_r    (glibtop *server, const char *string);
  42. void glibtop_free_r    (glibtop *server, const void *ptr);
  43.  
  44. END_LIBGTOP_DECLS
  45.  
  46. #endif
  47.